package com.gmail.blackdog1987.carcare.entity;

import java.util.List;

import com.gmail.blackdog1987.carcare.db.BaseModel;


public class TUser extends BaseModel implements java.io.Serializable {

	public Integer id;
	public String username;
	public String pwd;
	public String cartype;
	public String carnumber;
	public String enginenumber;
	public String carbonenumber;
	public long baoyang;
	public long nianjian;

	public TUser() {
	}

	public TUser(String username, String pwd, String cartype, String carnumber, String enginenumber, String carbonenumber, long baoyang, long nianjian) {
		this.username = username;
		this.pwd = pwd;
		this.cartype = cartype;
		this.carnumber = carnumber;
		this.enginenumber = enginenumber;
		this.carbonenumber = carbonenumber;
		this.baoyang = baoyang;
		this.nianjian = nianjian;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getCartype() {
		return this.cartype;
	}

	public void setCartype(String cartype) {
		this.cartype = cartype;
	}

	public String getCarnumber() {
		return this.carnumber;
	}

	public void setCarnumber(String carnumber) {
		this.carnumber = carnumber;
	}

	public String getEnginenumber() {
		return this.enginenumber;
	}

	public void setEnginenumber(String enginenumber) {
		this.enginenumber = enginenumber;
	}

	public String getCarbonenumber() {
		return this.carbonenumber;
	}

	public void setCarbonenumber(String carbonenumber) {
		this.carbonenumber = carbonenumber;
	}

	public long getBaoyang() {
		return this.baoyang;
	}

	public void setBaoyang(long baoyang) {
		this.baoyang = baoyang;
	}

	public long getNianjian() {
		return this.nianjian;
	}

	public void setNianjian(long nianjian) {
		this.nianjian = nianjian;
	}
	
	
	/** 表名称 */
	public static final String TABLE = "t_user";

	public enum Field {
		id,
		username,
		pwd,
		cartype,
		carnumber,
		enginenumber,
		carbonenumber,
		baoyang,
		nianjian;
	};
	
	@Override
	public List<String> getCreateSqlList() {
		mCreateSqlList.clear();
		StringBuilder createSql = new StringBuilder();
		createSql.append("CREATE TABLE if not exists " + TABLE + " (");
		createSql.append(Field.id + "               integer    primary key    autoincrement,");
		createSql.append(Field.username + "  text    ,");
		createSql.append(Field.pwd + "   	    text	,");
		createSql.append(Field.cartype + "      text	,");
		createSql.append(Field.carnumber + "      text	,");
		createSql.append(Field.enginenumber + "      text	,");
		createSql.append(Field.carbonenumber + "        text	,");
		createSql.append(Field.baoyang + "         integer	,");
		createSql.append(Field.nianjian + "         integer);");
		
		mCreateSqlList.add(createSql.toString());
		return super.getCreateSqlList();
	}

	@Override
	public List<String> getUpgradeSqlList(int oldVersion) {
		mUpgradeSqlList.clear();
		return super.getUpgradeSqlList(oldVersion);
	}

}
